<template>
    <div class="assetsdetailed">
        <section class="detailed">
            <ul class="detailedheader">
                <li class="list">
                    <h2>{{$t('gift[0]')}}</h2>
                </li>
            </ul>

            <section class="detailedmian">
                <el-table :data="giftlists.data" style="width: 100%">
                    <el-table-column prop="mark" :label="$t('gift[1]')" width="410" align="left"></el-table-column>
                    <el-table-column prop="money" :label="$t('gift[2]')" width="410" align="center"></el-table-column>
                    <el-table-column prop="created_at" :label="$t('gift[3]')" width="410" align="right"></el-table-column>
                </el-table>
                <PagesSize :content="giftlists" @func="getMsgFormSon"></PagesSize>
            </section>
        </section>
    </div>
</template>

<script>
import { assetInfo } from '@/api/user'
import { index,  giftlist } from '@/api/assetstotal'
import PagesSize from "_dom/paging"
export default {
    name: 'assetsdetailed',
        data () {
            return {
                giftlists: {
                    data: []
                },
                type: "1",
                changedata:{
                    page: "1",
                    wid: "1"
                },
                rechargetype:[],
                value:  "",
            }
        },
        methods: {
            getlist(){
                giftlist(this.changedata).then(res =>{
                     
                        this.giftlists = res;
                     
                })
            },
            getMsgFormSon(datavue) {
                this.changedata = datavue;
                this.getlist();
            }
        },
        created(){
            assetInfo({
              account: this.$route.query.type
            }).then(res => {
                
                    this.rechargetype = res.asset_list;
                    this.value = res.asset_list[0].wid;
                    this.indexget();
                 
            }).catch(err => {});
            this.getlist();
            
        },
        components: {
            PagesSize,
        },
    }
</script>

